<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;

class Goods extends Model
{
    protected $table = 'goods';

    public $fillable = [
        'agent_id', 'cate_id', 'supplier_id', 'name', 'pic',
        'cost', 'origin_price', 'price',
        'detail', 'order_num', 'status', 'is_home',
    ];

    // 是否首页展示
    public static $isHomeLabels = [
        0 => '否',
        1 => '是',
    ];

    const STATUS_01 = -1;
    const STATUS_0 = 0;
    const STATUS_1 = 1;
    const STATUS_2 = 2;

    public static $statusLabels = [
        self::STATUS_0 => '待上架',
        self::STATUS_1 => '已上架',
        self::STATUS_2 => '已下架',
    ];
}
